package com.itheima.health.dao;

import com.itheima.health.vo.HotSemeal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.itheima.health.pojo.Order;
import org.apache.ibatis.annotations.Mapper;
import com.itheima.health.vo.HotSemeal;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

/**
 * 预约订单持久层
 */
@Mapper
public interface OrderDao {
    /**
     *  新增预约订单
     * @param order 预约订单信息
     */
    void insert(Order order);

    /**
     *  根据id查询订单
     * @param id    订单id
     * @return      订单信息
     */
    Order findById(Integer id);

    /**
     * 根据订单日期范围和订单状态统计
     * @param starDate
     * @param endDate
     * @return
     */
    Integer getOrderCount(LocalDate starDate, LocalDate endDate,@Param("status") String str);

    /**
     * 查询套餐
     *
     * @return
     */
    List<HotSemeal> getHotSetmeal();

    Integer getOrderCount(@Param("starDate") LocalDate today, @Param("endDate") LocalDate today1, @Param("status") Object o);
}
